<template>
    <div>
        <Header></Header>
        <Swiper :swiperList="indexData.swiperList"></Swiper>
        <icons :iconList="indexData.iconList"></icons>
        <hotRecommend :recommendList="indexData.recommendList"></hotRecommend>
    </div>
</template>

<script>
import Header from './components/Header.vue'
import Swiper from './components/HomeSwiper.vue'
import icons from './components/icons.vue'
import hotRecommend from './components/hotRecommend.vue'

export default {
    data() {
        return {
            indexData:'',
        }
    },
    created(){
        this.getIndexData();
        console.log(this.indexData.iconList)
    },
    methods: {
        getIndexData() {
           this.$http.get("mock/index.json").then(result => {
                if(result.status==0||result.status==200){
                    this.indexData= result.data.data
                    console.log( this.indexData )
                }
            })
        }
    },
    components: {
       Header,
       Swiper,
       icons,
       hotRecommend
    }
}


</script>

<style scoped>

</style>

